home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  1.4 KB  |  74 lines  |  [TEXT/MPS ]

  1. /*
  2.     Signal.h -- Signal handling
  3.     
  4.     Copyright Apple Computer,Inc.    1988, 1990
  5.     All rights reserved.
  6.  
  7. */
  8.  
  9. #ifndef __SIGNAL__
  10. #define __SIGNAL__
  11.  
  12.  
  13. typedef int sig_atomic_t;
  14.  
  15.  
  16. /*
  17.  *    Special signal handlers, compatible with the second argument to signal()
  18.  *    or, in the case of SIG_ERR, the return value from signal().
  19.  */
  20.  
  21. #define SIG_DFL ((void (*)(int)) 1)
  22. #define SIG_ERR ((void (*)(int)) -1)
  23. #define SIG_IGN ((void (*)(int)) 0)
  24. #define SIG_HOLD ((void (*)(int)) 3)
  25. #define SIG_RELEASE ((void (*)(int)) 5)
  26.  
  27.  
  28. /*
  29.  *    Signal numbers for specific conditions.
  30.  */
  31.  
  32. #define SIGABRT        (1<<0)    /* Abnormal termination e.g. by the abort() function */
  33. #define SIGFPE        (1<<2)    /* Arithmetic exception -- not currently implemented */
  34. #define SIGILL        (1<<3)    /* Illegal instruction -- not currently implemented */
  35. #define SIGINT        (1<<1)    /* Interactive attention signal -- User interrupt via CMD-. */
  36. #define SIGSEGV        (1<<4)    /* Segmentation violation -- not currently implemented */
  37. #define SIGTERM        (1<<5)    /* Termination request -- not currently implemented */
  38.  
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #ifdef __CFM68K__
  45.     #ifdef UsingSharedLibs
  46.         #pragma lib_export on
  47.     #endif
  48. #endif
  49.  
  50. /*
  51.  *    Specify a signal handling function.
  52.  */
  53.  
  54. void (*signal (int sig, void (*func) (int))) (int);
  55.  
  56.  
  57. /*
  58.  *    Send a signal.
  59.  */
  60.  
  61. int raise (int sig);
  62.  
  63. #ifdef __CFM68K__
  64.     #ifdef UsingSharedLibs
  65.         #pragma lib_export off
  66.     #endif
  67. #endif
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif
  74.